<%@ page language="java" pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="s" uri="/struts-tags"%>

<s:form action="updateConfiguration.htm" method="post" theme="simple" id="form">
	<table width="100%">
		<tbody>
			<tr>
        		<td height="40" colspan="2" class="sectionheading bottom-border">Configuration</td>
			</tr>
			<tr>
				<td>
					&nbsp;
				</td>
				<td>
					<s:actionmessage cssClass="note-red" />
					<s:actionerror cssClass="note-red" />
					<s:fielderror cssClass="note-red" />
				</td>
			</tr>
			<tr>
				<td align="right" class="verdana12blacknormal">
					Site Name (you may use html):
				</td>
				<td>
					<s:textfield theme="simple" cssClass="Textfiled-border" name="configuration.siteName" size="40" value="%{configuration.siteName}" />
				</td>
			</tr>
			<tr>
				<td align="right" class="verdana12blacknormal">
					System Directories:
				</td>
				<td>
					<s:textfield theme="simple" cssClass="Textfiled-border" name="configuration.systemDirectories" size="40" value="%{configuration.systemDirectories}" />
				</td>
			</tr>
			<tr>
				<td align="right" class="verdana12blacknormal">
					Use Secure Server:
				</td>
				<td>
					<s:select theme="simple" cssClass="Textfiled-border" value="%{configuration.useSecureServer}" name="configuration.useSecureServer" list="#{'on':'Yes', 'off':'No'}"></s:select>
				</td>
			</tr>
			<tr>
				<td align="right" class="verdana12blacknormal">
					Secure Server URL:
				</td>
				<td>
					<s:textfield theme="simple" cssClass="Textfiled-border" name="configuration.secureServerUrl" size="65" value="%{configuration.secureServerUrl}" />
				</td>
			</tr>
			<tr>
				<td align="right" class="verdana12blacknormal">
					SQL Server Type:
				</td>
				<td>
					<s:select theme="simple" cssClass="Textfiled-border" value="%{configuration.databaseServerType}" name="configuration.databaseServerType" list="#{'MySQL':'MySQL', 'MS_SQL':'MS_SQL'}"></s:select>
				</td>
			</tr>
			<tr>
				<td align="right" class="verdana12blacknormal">
					SQL Database Driver:
				</td>
				<td>
					<s:select theme="simple" cssClass="Textfiled-border" value="%{configuration.databaseDriver}" name="configuration.databaseDriver" list="#{'mysql':'mysql', 'ODBC':'ODBC'}"></s:select>
				</td>
			</tr>

			<tr>
				<td align="right" class="verdana12blacknormal">
					SQL Host:
				</td>
				<td>
					<s:textfield theme="simple" cssClass="Textfiled-border" name="configuration.databaseHost" size="50" value="%{configuration.databaseHost}" />
				</td>
			</tr>
			<tr>
				<td align="right" class="verdana12blacknormal">
					SQL Database Name:
				</td>
				<td>
					<s:textfield theme="simple" cssClass="Textfiled-border" name="configuration.databaseName" size="40" value="%{configuration.databaseName}" />
				</td>
			</tr>
			<tr>
				<td align="right" class="verdana12blacknormal">
					SQL Database User name:
				</td>
				<td>
					<s:textfield theme="simple" cssClass="Textfiled-border" name="configuration.databaseUserName" size="40" value="%{configuration.databaseUserName}" />
				</td>
			</tr>
			<tr>
				<td align="right" class="verdana12blacknormal">
					SQL Database Password:
				</td>
				<td>
					<s:textfield theme="simple" cssClass="Textfiled-border" name="configuration.databasePassword" size="40" value="%{configuration.databasePassword}" />
				</td>
			</tr>
			<tr>
				<td align="right" class="verdana12blacknormal">
					SQL Host Port:
				</td>
				<td>
					<s:textfield theme="simple" cssClass="Textfiled-border" name="configuration.databaseHostPort" size="40" value="%{configuration.databaseHostPort}" />
				</td>
			</tr>
			<tr>
				<td align="right" class="verdana12blacknormal">
					Default Meta Title:
				</td>
				<td>
					<s:textfield theme="simple" cssClass="Textfiled-border" name="configuration.defaultMetaTitle" size="60" value="%{configuration.defaultMetaTitle}" />
				</td>
			</tr>

			<tr>
				<td valign="top" align="right" class="verdana12blacknormal">
					Default Meta Description:
				</td>
				<td>
					<s:textarea theme="simple" cssClass="Textfiled-border" rows="8" name="configuration.defaultMetaDescription" cols="60" value="%{configuration.defaultMetaDescription}"></s:textarea>
				</td>
			</tr>
			<tr>
				<td valign="top" align="right" class="verdana12blacknormal">
					Default Meta Keywords:
				</td>
				<td>
					<s:textarea theme="simple" cssClass="Textfiled-border" rows="8" name="configuration.defaultMetaKeywords" cols="60" value="%{configuration.defaultMetaKeywords}"></s:textarea>
				</td>
			</tr>

			<tr>
				<td align="center" colspan="2">
					<s:submit theme="simple" type="image" src="../Admin-Images/submit-btn.gif" value="Save Changes" />
					<input type="image" src="../Admin-Images/reset-button.gif" value="Reset" onclick="this.form.reset();">
				</td>
			</tr>
		</tbody>
	</table>
	<s:hidden name="configuration.id" value="%{configuration.id}" />
</s:form>